package com.fengyun.config;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;

/**
 * 自定义MyPropertiesSource类，添加了@PropertySource({"classpath:db.properties"})注解
 */
@PropertySource({"classpath:db.properties"})
public class MyPropertiesSource {

	@Value("db.username")
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "MyPropertiesSource{" +
				"name='" + name + '\'' +
				'}';
	}
}
